<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnAttrStrInCheckListTable extends AbstractMigration
{
    public function up()
    {
        $this->table('check_list')
            ->addColumn('attr_str', 'string', [
                'null' => false,
                'default' => '',
                'limit' => 256,
                'comment' => '属性str',
            ])
            ->addColumn('project_template_id', 'integer', ['signed' => false, 'default' => 0, 'limit' => 11, 'comment' => '项目模板ID'])
            ->save();
    }

    public function down()
    {
        $this
            ->table('check_list')
            ->removeColumn('attr_str')
            ->removeColumn('project_template_id')
            ->save();
    }
}
